package com.sinux.generality.provider.pay.factory;

import com.sinux.generality.provider.pay.factory.detailorder.AbstractMembershipPayOrderDetail;
import com.sinux.generality.provider.pay.factory.detailorder.impl.WxAbstractMembershipPayOrderDetail;
import com.sinux.generality.provider.pay.factory.interfaces.PayOrderDetail;
import com.sinux.generality.provider.pay.factory.interfaces.PayOrderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/****
 * @className WxFactory
 * @describe 微信支付工厂创建订单具体实现
 * @author lhz
 * @date 2021/10/19 03:29
 * @version 0.0.1
 */
@Component
public class WxFactory implements PayOrderFactory {
    @Autowired
    private WxAbstractMembershipPayOrderDetail wxAbstractMembershipPayOrderDetail;
    private static WxAbstractMembershipPayOrderDetail wxAbstractMembershipPayOrderDetails;
    @PostConstruct
    public void init() {
        wxAbstractMembershipPayOrderDetails = this.wxAbstractMembershipPayOrderDetail;
    }
    /****
     * createMembershipPayOrder 创建会员费子单
     * @author lhz
     * @return PayOrderDetail
     */

    @Override
    public PayOrderDetail createMembershipPayOrder() {
        return wxAbstractMembershipPayOrderDetails;
    }
}